package generadorDescriptores.forms;

import java.io.File;
import java.io.InputStream;

import javax.swing.ImageIcon;

public class Help extends javax.swing.JDialog {

	/** Creates new form Help */
	public Help(java.awt.Frame parent, boolean modal) {
		super(parent, modal);
		initComponents();
		this.setTitle("Acerca del Editor");
		this.setDefaultCloseOperation(HIDE_ON_CLOSE);
		this.setLocationRelativeTo(null);
		this.loadImage();
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		ButtonAceptar = new javax.swing.JButton();
		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		LabelImagen = new javax.swing.JLabel();

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

		ButtonAceptar.setText("Aceptar");
		ButtonAceptar.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				ButtonAceptarActionPerformed(evt);
			}
		});

		jLabel1
				.setText("Editor y generador de Descriptores para BIPYME versi\u00f3n 1.0");

		jLabel2
				.setText("Con esta aplicaci\u00f3n podr\u00e1 editar y crear descriptores XML los cuales ");

		jLabel3
				.setText("permiten definir distintas caracter\u00edsticas de BIPYME. ");

		org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								layout
										.createSequentialGroup()
										.addContainerGap()
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(
																org.jdesktop.layout.GroupLayout.TRAILING,
																layout
																		.createParallelGroup(
																				org.jdesktop.layout.GroupLayout.CENTER)
																		.add(
																				jLabel1)
																		.add(
																				jLabel2)
																		.add(
																				jLabel3)
																		.add(
																				ButtonAceptar,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				110,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
														.add(
																LabelImagen,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																327,
																Short.MAX_VALUE))
										.addContainerGap()));
		layout.setVerticalGroup(layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				layout.createSequentialGroup().add(LabelImagen,
						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200,
						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(18,
						18, 18).add(jLabel1).addPreferredGap(
						org.jdesktop.layout.LayoutStyle.RELATED).add(jLabel2)
						.addPreferredGap(
								org.jdesktop.layout.LayoutStyle.RELATED).add(
								jLabel3).addPreferredGap(
								org.jdesktop.layout.LayoutStyle.RELATED, 27,
								Short.MAX_VALUE).add(ButtonAceptar)
						.addContainerGap()));

		pack();
	}// </editor-fold>
	//GEN-END:initComponents

	private void ButtonAceptarActionPerformed(java.awt.event.ActionEvent evt) {
		this.dispose();
	}

	private void loadImage() {
		ImageIcon image = new ImageIcon("icons/logohelp.jpg");
		LabelImagen.setIcon(image);
		LabelImagen.repaint();
	}

	/**
	 * @param args the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				Help dialog = new Help(new javax.swing.JFrame(), true);
				dialog.addWindowListener(new java.awt.event.WindowAdapter() {
					public void windowClosing(java.awt.event.WindowEvent e) {

					}
				});
				dialog.setVisible(true);
			}
		});
	}

	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JButton ButtonAceptar;
	private javax.swing.JLabel LabelImagen;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel3;
	// End of variables declaration//GEN-END:variables

}